-- @author lixiyong01
-- @date 2023.08.20
-- 空表检查并进行通知

use hdp_lbg_supin_zplisting;

insert overwrite table app_zp_rock_table_filesize_0b partition(dt=${dateSuffix})
select
    table_id,
    db_name,
    tbl_name,
    user_name,
    filesize,
    create_time,
    location as hdfs_location,
    hot,
    access_last_time,
    update_last_time,
    max_access_span_in_100_days
from hdp_lbg_supin_zplisting.dwd_zp_rock_table_meta_info
where dt = '${#date(0,0,-1):yyyyMMdd#}'
    and is_claim = 1
    and filesize = 0
    and create_time<'${#date(0,0,-7):yyyy-MM-dd#}'
    and tbl_name not like 'tbd_%'
	and tbl_name not like 'vw_%'
	and tbl_name not like 'view_%'
	and tbl_name not like 'dwsv_%';
